<?php
	require_once('recaptchalib.php');

	// Get a key from http://recaptcha.net/api/getkey
	//$publickey = "6LdzzAUAAAAAALkdNd_DRRniHS8ms_hPI4v0k_h6";
	$privatekey = "6LeDYsASAAAAALyVH3iWhxA4yCPgIow2_cTY-Lcc";

	# the response from reCAPTCHA
	$resp = null;
	# the error code from reCAPTCHA, if any
	$error = null;

	# was there a reCAPTCHA response?
	$errmes="Incorrect security verification. Please retry.";
	if ($_POST["recaptcha_response_field"])
	{
		$resp = recaptcha_check_answer ($privatekey,
	                                     $_SERVER["REMOTE_ADDR"],
	                                     $_POST["recaptcha_challenge_field"],
	                                     $_POST["recaptcha_response_field"]);
		if ($resp->is_valid)
		{
			$errmes="Successful";
		}
	}
	//echo $errmes;
?>
